<template>
<!-- 导航栏 -->
<div class="nav">
	<mu-drawer :open="true" :docked="true" :z-depth="0">
		<mu-appbar :z-depth="0">
			ISG Manager
		</mu-appbar>
		<mu-divider />
		<mu-list toggle-nested>
			<template v-for="(o,i) in data">
				<mu-list-item v-if="o.subset" button :ripple="false" nested :open="open === o.name" @toggle-nested="open = arguments[0] ? o.name : ''">
					<mu-list-item-action>
						<i class="mdi mdi-24px" :class="o.icon"></i>
					</mu-list-item-action>
					<mu-list-item-title>{{o.name}}</mu-list-item-title>
					<mu-list-item-action>
						<mu-icon class="toggle-icon" size="24" value="keyboard_arrow_down"></mu-icon>
					</mu-list-item-action>

					<mu-list-item button v-for="(o,i) in o.subset" :key="i" :to="o.link" :ripple="false" slot="nested">
					<!-- <mu-list-item button v-for="(o,i) in o.subset" :key="i" :href="'/#/'+o.link" :ripple="false" slot="nested"> -->
						<mu-list-item-title>{{o.name}}</mu-list-item-title>
					</mu-list-item>
				</mu-list-item>
				<mu-list-item v-else button :to="o.link">
					<i class="mdi mdi-24px" :class="o.icon"></i>
					<mu-list-item-title>{{o.name}}</mu-list-item-title>
				</mu-list-item>
			</template>
		</mu-list>
	</mu-drawer>
	<mu-appbar color="blueGrey500">
		{{title ? title : '管理'}}
		<mu-button flat slot="right">v1.0.0</mu-button>
	</mu-appbar>
</div>
</template>

<script>
export default {
	name: 'navigation',
	props: ['title'],
	data: () => ({
		open: '标签管理',
		data: [
			// {
			// 	name: '总览',
			// 	icon: 'mdi-monitor-dashboard',
			// 	value: 'dashboard',
			// 	link: '/',
			// },
			{
				name: '标签管理',
				icon: 'mdi-tag',
				value: 'tag',
				subset: [{
						name: '标签列表',
						link: 'tag',
					},
					{
						name: '标签关系列表',
						link: 'tagRelationship',
					},
				],
			},
			{
				name: '商品管理',
				icon: 'mdi-archive',
				value: 'goods',
				subset: [{
					name: '商品列表',
					link: 'goods',
				},
				{
					name:'商品图片查询',
					link:'backendProductImage'
				},
				{
					name:'商品访问详情列表',
					link:'talkHistoryList'
				}
				],
			},
				{
				name: '模特搭配管理',
				icon: 'mdi-flower-tulip',
				value: 'Model',
				subset: [{
					name: '模特搭配管理',
					link: 'productModelList',
				}
				],
			},
			{
				name: '用户管理',
				icon: 'mdi-account-circle',
				value: 'user',
				subset: [
				{
					name:'用户登录详情',
					link:'userLoginInfoList'
				},
				{
					name:'用户行为分析',
					link:'backendUserAction'
				},
				{
					name:'用户角色列表',
					link:'sysUserRoleList'
				}],
			},
			{
				name: '后台管理',
				icon: 'mdi-settings-outline',
				value: 'adminuser',
				subset: [
				{
					name:'后台用户操作记录',
					link:'sysUserActionList'
				},
				{
					name:'后台用户管理',
					link:'sysUserList'
				},
				{
					name:'后台菜单管理',
					link:'sysMenuList'
				},
				{
					name:'后台角色管理',
					link:'sysRoleList'
				}],
			},
				{
				name: '分词管理',
				icon: 'mdi-box-cutter',
				value: 'adminuser',
				subset: [
				{
					name:'分词管理',
					link:'participleList'
				},
				{
					name:'同音词管理',
					link:'tagHomonymList'
				},
				{
					name:'噪词管理',
					link:'stopWordList'
				}],
			},
			{
				name: 'banner/广告管理',
				icon: 'mdi-bullhorn-outline',
				value: 'banner',
				subset: [
				{
					name:'banner管理',
					link:'sysAdInfoList'
				},
				{
					name:'广告位管理',
					link:'sysAdList'
				}],
			},
			{
				name: '大屏设备管理',
				icon: 'mdi-projector-screen',
				link:'bigScreen'
			},
			{
				name: '机器人形象管理',
				icon: 'mdi-robot',
				link:'userRobotList'
			},
			{
				name: '筛选菜单设置',
				icon: 'mdi-tag',
				link:'topLevelCateList'
			},
			{
				name: '角色菜单管理',
				icon: 'mdi-clipboard-account-outline',
				link:'sysRoleMenuList'
			},
			{
				name:'闲聊知识管理',
				icon: 'mdi-forum-outline',
				link:'knowledgeList'
			}
		],
	}),
	mounted() {},
	methods: {}
}
</script>

<style lang="scss" scoped>

</style>
